package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/11/9 20:31
 **/
@Getter
@AllArgsConstructor
public enum VideoFileTransferResultEnum {
    TRANSFERRING(0, "转码中"),
    SUCCESS(1, "转码成功"),
    FAILED(2, "转码失败"),
    ;

    private Integer code;

    private String desc;

    public static VideoFileTransferResultEnum getEnumByCode(Integer code) {
        for (VideoFileTransferResultEnum e : VideoFileTransferResultEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
